<%--
  Created by IntelliJ IDEA.
  User: wangh
  Date: 2020/12/24
  Time: 23:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>电脑销售管理后台</title>

    <!-- 1. 导入CSS的全局样式 -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="css/public.css">
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <!-- 2. jQuery导入，建议使用1.9以上的版本 -->
    <script src="js/jquery-3.3.1.min.js"></script>
    <!-- 3. 导入bootstrap的js文件 -->
    <script src="js/bootstrap.min.js"></script>
</head>
<body style="background-color: #F2F2F2">
<div class="logoBar">
    <div class="comWidth" style="display: block;">
        <p style="font-size: 35px;font-weight: bolder;padding-left: 100px;padding-top: 12px;color: white;">电脑销售管理后台</p>
        <c:if test="${administrators_login==null}">
            <a href="${pageContext.request.contextPath}/login.jsp">
                <button type="button" class="btn btn-default"
                        style="float: right;margin-top: -48px;margin-right: 100px;">
                    登录
                </button>
            </a>
        </c:if>
        <c:if test="${administrators_login!=null}">
            <div class="btn-group" style="float: right;margin-top: -48px;margin-right: 100px;">
                <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown"
                        aria-haspopup="true" aria-expanded="false">
                        ${administrators_login.username}<span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                    <li><a href="${pageContext.request.contextPath}/outAdminLoginServlet">注销登录</a></li>
                </ul>
            </div>
        </c:if>
    </div>
</div>
<c:if test="${administrators_login==null}">
    <div style="width: 1200px;margin:50px auto;">
        <div class="page-header" style="text-align: center;">
            <h1>还未登录，请先登录！</h1>
        </div>
    </div>
</c:if>
<c:if test="${administrators_login!=null}">
    <div style="width: 1200px;margin:50px auto;">
        <div class="page-header" style="text-align: center;">
            <h1>${administrators_login.username}，<small>欢迎您！</small></h1>
        </div>
        <div class="list-group" style="margin: 0 200px;">
            <a href="#" class="list-group-item active disabled" style="text-align: center;">
                后台管理操作
            </a>
            <a href="${pageContext.request.contextPath}/findGoodsServlet" class="list-group-item">商品管理</a>
            <a href="${pageContext.request.contextPath}/findUserServlet" class="list-group-item">用户管理</a>
            <a href="${pageContext.request.contextPath}/findAllOrderServlet" class="list-group-item">订单管理</a>
        </div>
    </div>
</c:if>
</body>
</html>
